// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License

import LuMetaData from '../models/LuMetaData';
import { LuIntentName } from '../models/stringTypes';

/**
 * example: 'TextInput_Response_RuZhXe' <= { type: 'TextInput_Response', designerId: 'RuZhXe' } // LuMetaData
 *
 * @param LuMetaData input metadata
 * @returns toString() result of the input object.
 */
export default function buildLuIntentName(luMetaData: LuMetaData): LuIntentName {
  const { type, designerId } = luMetaData;
  return `${type}_${designerId}`;
}
